package com.ehome.poct.base.device.service;

import com.ehome.core.page.PageInfo;
import com.ehome.core.service.AbstractCrudServiceImpl;
import com.ehome.poct.base.api.dto.device.DeviceQry;
import com.ehome.poct.base.api.dto.device.bootModule.TestDeviceBootingHistDTO;
import com.ehome.poct.base.api.virtual.device.TestDeviceBootingHistService;
import com.ehome.poct.base.api.vo.device.BootInfoVO;
import com.ehome.poct.base.api.vo.device.TestDeviceBootingHistVO;
import com.ehome.poct.base.device.repository.TestDeviceBootingDetailRepository;
import com.ehome.poct.base.device.repository.TestDeviceBootingHistRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
 * 设备开机自检记录SerivceImlp
 *
 * @author laobai
 * @Date 2022-10-14 17:38
 */
@Service
public class TestDeviceBootingHistServiceImpl extends AbstractCrudServiceImpl<TestDeviceBootingHistDTO> implements TestDeviceBootingHistService {

    @Autowired
    private TestDeviceBootingDetailRepository bootingDetailRepository;
    @Autowired
    private TestDeviceBootingHistRepository bootingHistRepository;
    /**
     * 获取设备开机记录统计列表信息
     * @param qry 查询条件
     * @return 含分页信息 开机自检概述 几大模块的状态
     */
    @Override
    public PageInfo<TestDeviceBootingHistVO> getSnoDetailList(DeviceQry qry) {
      return   bootingHistRepository.getSnoDetailList(qry);
    }
    /**
     * 获取设备开机记录统计列表信息
     * @param qry 查询条件 sno和时间
     * @return 设备的开机自检统计信息 分页
     */
    @Override
    public PageInfo<BootInfoVO> getAllBootInfo(DeviceQry qry){
        return bootingHistRepository.getAllBootInfo(qry);
    }
}